package com.lagou.mapper;

import com.lagou.pojo.Resume;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

public interface ResumeMapper {
    //根据id查询对应评论信息
    @Select("select * from tb_resume where id = #{id}")
    public Resume queryResumeById(Integer id);

    @Select("select * from tb_resume ")
    public List<Resume> queryResumeList();

    @Update(" UPDATE  tb_resume SET NAME=#{name} , address=#{address} ,phone=#{phone}  WHERE id=#{id} ")
    public Integer updateResumeById(Resume resume);

    @Insert(" INSERT INTO tb_resume  (NAME,address,phone) VALUES (#{name},#{address},#{phone} ) ")
    public Integer save(Resume resume);

    @Delete(" delete from tb_resume  where id = #{id}")
    public Integer deleteResumeById(Integer id);
}
